package com.fsts.util;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class TestDes {
	public static void main(String args[]) {
		BufferedReader line = new BufferedReader(new InputStreamReader(
				System.in));

		Des s = new Des();
		String key = "11111111";
		s.setKey(key);
		System.out.println("请输入要加密的信息：");
		String ss = "";
		try {
			ss = line.readLine();
		} catch (IOException e) {
			e.printStackTrace();
		}

		String p = s.encrypt(ss);
		System.out.println("KEY：" + key);
		System.out.println("加密后的密文：" + p);
		System.out.println("解密后的明文:" + s.dsencrypt(p));
	}
}